-- GENERATED SPELL FOR [Dark Iron Taskmaster] --


function spell0_5846(pUnit, Event) --@Battle Command,Self--
pUnit:FullCastSpellOnTarget(5115,pUnit)
pUnit:RegisterEvent('Sorts_5846', 6347, 1)
end

function spell1_5846(pUnit, Event) --@Dark Iron Taskmaster Death,Self--
pUnit:FullCastSpellOnTarget(12613,pUnit)
pUnit:RegisterEvent('Sorts_5846', 6322, 1)
end

function Sorts_5846(pUnit, Event)
local choix_sorts_5846 = math.random(0, 1)
if choix_sorts_5846 == 0 then
pUnit:RegisterEvent('spell0_5846', 1, 1)
end
if choix_sorts_5846 == 1 then
pUnit:RegisterEvent('spell1_5846', 1, 1)
end
end

function mob5846_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5846', math.random(1500, 3000), 1)
end

function mob5846_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5846_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5846_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5846, 1, 'mob5846_Action')
RegisterUnitEvent(5846, 2, 'mob5846_Leave')
RegisterUnitEvent(5846, 3, 'mob5846_Kill')
RegisterUnitEvent(5846, 4, 'mob5846_Die')
